﻿#ifndef GPIODATA_H
#define GPIODATA_H

#include <QObject>


#define GPIO_TEST 1


#define GPIO_HEAT   25
#define GPIO_REFRI  29

#define GPIO_ELECTRIC_VALVE_ONE  5
#define GPIO_ELECTRIC_VALVE_TWO  6
#define GPIO_ELECTRIC_VALVE_THREE  26
#define GPIO_ELECTRIC_VALVE_FOUR  27
#define GPIO_ELECTRIC_VALVE_FIVE  28


#define VACCCM_PUMP  1

#define D4  21
#define D3  22
#define D2  23
#define D1  24
#define CO  28
#define DEVICES  27


class GpioData : public QObject
{
    Q_OBJECT
public:
    explicit GpioData(QObject *parent = NULL);
    virtual ~GpioData();

    void initGpio();


    void openHeat();
    void closeHeat();
    void openRefri();
    void closeRefri();

    int getHeat();
    int getRefri();

    void openD1();
    void closeD1();
    int getD1();

    void openD2();
    void closeD2();
    int getD2();

    void openD3();
    void closeD3();
    int getD3();

    void openD4();
    void closeD4();
    int getD4();

    void openPump();
    void closePump();
    int getPump();

    void openCo();
    void closeCo();
    int getCo();


    void openDevice();
    void closeDevice();
    int getDevice();


    void handlDeviceStatus(int pins ,int status);

    static GpioData * gestance();
signals:

public slots:
};

#endif // GPIODATA_H
